import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {Form} from '@angular/forms';

@Component({
  selector: 'app-form',
  templateUrl: './form.component.html',
  styleUrls: ['./form.component.sass']
})
export class FormComponent implements OnInit {

  @ViewChild('toM2GForm')
  toM2GForm: ElementRef;

  constructor() { }

  ngOnInit() {
    this.toM2GForm.nativeElement.submit();
  }
}
